Skip to content

Feed real coverage to SonarCloud and scope scanning to what the plan exposes - #133

Merged
JE-Chen merged 2 commits into
mainfrom
dev
Aug 2, 2026
Merged

Feed real coverage to SonarCloud and scope scanning to what the plan exposes#133
JE-Chen merged 2 commits into
mainfrom
dev

Conversation

@JE-Chen

@JE-Chen JE-Chen commented Aug 2, 2026

Copy link
Copy Markdown
Member

Follow-up to #132, which moved SonarCloud to CI-based analysis. Two things that
migration surfaced.

Coverage

The quality gate on main fails on exactly one condition — new code scored at
0% coverage against a threshold of 80 — because no coverage report has ever been
uploaded. The 3.12 matrix leg now runs pytest under coverage and hands the report
to the scanner as an artifact.

.coveragerc sets relative_files = True: the report is produced on Windows and
read by a Linux scanner, so it must not carry an absolute <source> root.

Real coverage is 57% overall — utils/ and tools_gui sit at 95–100%, the
UI layer between 20% and 45%. This reports an honest number; it does not
necessarily clear the 80 threshold.

Scan scope

SonarCloud's plan for this organization exposes results for main and for pull
requests only. An analysis pushed for dev is accepted and its compute-engine
task succeeds, but every read of it returns 403, and no project in the
organization has a branch other than main. Scanning each push to dev was
spending CI time on numbers nobody can see, so dev.yml now scans pull requests
only. stable.yml still scans pushes to main.

Both sonarcloud jobs gain needs: unit-tests so they can consume the artifact.


Merging this publishes 1.0.29 to PyPI, as every merge to main does.

JE-Chen added 2 commits August 3, 2026 03:01
A rule kept in a side document is a rule nobody reads, which is how the
architecture tree in this file drifted out of date. Reference material that is
not a rule keeps its own file and is linked from here.
Two things the migration to CI-based analysis surfaced.

The quality gate on main fails on one condition: new code is scored at 0%
coverage against a threshold of 80, because no coverage report has ever been
uploaded. The 3.12 matrix leg now runs pytest under coverage and hands the
report to the scanner as an artifact. .coveragerc sets relative_files because
the report is produced on Windows and read by a Linux scanner, so it must not
carry an absolute source root. Real coverage is 57% overall -- utils and
tools_gui sit at 95-100%, the UI layer between 20% and 45% -- so this reports an
honest number rather than necessarily clearing the gate.

SonarCloud's plan for this organization exposes results for main and for pull
requests only. An analysis pushed for dev is accepted and its compute-engine
task succeeds, but every read of it returns 403, and no project in the
organization has a branch other than main. Scanning each push to dev therefore
spent CI time producing numbers nobody can see, so dev.yml now scans pull
requests only; stable.yml still scans pushes to main.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@sonarqubecloud

sonarqubecloud Bot commented Aug 2, 2026

Copy link
Copy Markdown

@JE-Chen
JE-Chen merged commit e31bfaf into main Aug 2, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant